/*************************************************************************
    > File Name: variable_in_section_memory.c
    > Author:		
    > Mail:		
    > Created Time: 2021年03月21日 星期日 18时10分53秒
 ************************************************************************/

#include <stdio.h>
#include <stdlib.h>

extern char etext, edata, end;
char glob_buf[65536];
int prime[] = {2, 3, 5, 7, 11};

static int square(int x)
{
	int result;
	result = x * x;

	return result;
}

static void do_cal(int key)
{

	printf("The square of %d is %d\n", key, square(key));

	if (key < 1000) {
		int t;

		t = key * key * key;
		printf("The cube of %d is %d\n", key, t);
	}

}

int main(int argc, char *argv[])
{

	static int key = 9973;
	static char mbuf[10240000];
	char *p;

	p = malloc(1024);

	do_cal(key);
	printf("text:%10p, data:%10p, end:%10p\n", &etext, &edata, &end);
	return 0;
}
